package com.cindata

import com.cindata.dictionary.*

class WorkflowStage
{
    Integer executionSequence
    String name
    Boolean canReject = true
    Layout layout

    static belongsTo = [workflow: Workflow]

    static hasMany = [conditions: WorkflowStageCondition, events: WorkflowStageEvent, notifications: WorkflowStageNotification]

    static mapping = {
        autowire true
    }

    static constraints = {
        executionSequence unique: ['workflow'], min: 1, max: 10000
        layout nullable: true, blank: true
        canReject nullable: true, blank: true
        name unique: ['workflow']
    }

    static mappedBy = [conditions: 'workflowStage']

}
